// plugin/components/hello-component.js
Component({
  properties: {

  },

  data: {
    args: {
      withCredentials: true,
      lang: 'zh_CN'
    }
  },

  methods: {
    bindsuccess(e) {
      console.log('成功')
      console.log(e);
    },
    bindFail(e) {
      console.log('错误')
      console.log(e)
    },
    wxLogin() {
      console.log('asd')
      wx.login({
        timeout: 0,
        success(res) {
          console.log(res);
        },
        fail(err) {
          console.log(err)
        }
      })
    },
    payment() {
      wx.requestPluginPayment({
        fee: 1,
        paymentArgs: {
          nonceStr: '02966a3650f14371a4ebff88c5bf9488',
          package: 'prepay_id=wx1318012571137626497ba031edcc3e0000',
          paySign: 'GTqyExVJgKXSPQWvHtfqwGeR9g0kX2qjD8WQtwlufoPTfwBKDHnamu6KagYh8lMOxYT2xed1gAWoob9nLkE39V0Ekh/2ZkJaqTSctj1bSUVlEk4XxX5uhJIwDDJdxpjV62WJ2nviptb3o3H6sZi2rIfXxen5q4jhDY7yVPvTsI7gu/6ASchO/Or1WcQXIyg9hqtPoV/c35DP9YOc93TlhleHcSCd458l/xDoO0ZI2YfTlrGjprByft4Aw34lzM6NPxFtGZXZ3uteJK9BcrRr6iZMka6AErHrGu02wAZMGZ0nogSkuTsAbSvGH3MVuW1itQzpqwsvYj66UoZLzSBoPA==',
          signType: 'RSA',
          timeStamp: '1665655285',
        },
        currencyType: 'USD',
        version: 'develop',
        success(r) {
          console.log(r)
        },
        fail(e) {
          console.error(e)
        }
      })
    },
  }
})